/** 
*@��Ŀ����: UIBase 
*@�ļ�����: BaseFragment.java 
*@Author: linlin.zou
*@Date: 2014-12-3 
*@Copyright: 2014 www.alipear.com Inc. All rights reserved. 

*ע�⣺�����ݽ������Ϻ�Ѽ���������޹�˾�ڲ����ģ���ֹ��й�Լ�������������ҵĿ�� 
*/
package com.alipear.shopcredit.common.view.wrapper;

import com.alipear.serverrequest.RequestProgressInterface;
import com.handmark.pulltorefresh.library.PullToRefreshBase;

public  class RequestWrapperCommonView   extends RequestWrapperBase{
    private UpdateCommonRequest mUserCallback;

    public RequestWrapperCommonView(PullToRefreshBase<?> contentView, UpdateCommonRequest callback) {
        super(contentView, true, false);
        if (contentView == null) {
            return;
        }
        mUserCallback = callback;
    }

    @Override
    public void onPullDownToRefresh(PullToRefreshBase refreshView) {
        mUserCallback.updateCommon(new RequestProgressInterface() {
            @Override
            public void onRequestStart() {

            }

            @Override
            public void onRequestFinish() {
                mContentView.onRefreshComplete();
            }

            @Override
            public void onProgress(long bytesWritten, long totalSize) {

            }
        });
    }
    @Override
    public void onPullUpToRefresh(PullToRefreshBase refreshView) {
    }
}
